﻿using Newtonsoft.Json;
using Wechat.Core;
using Wechat.Core.Models;

namespace Wechat.MP.Auth.Models
{
    /// <summary>
    /// { 
    ///     ApiParameterKey.ACCESS_TOKEN:"ACCESS_TOKEN",
    ///     "expires_in":7200,
    ///     "refresh_token":"REFRESH_TOKEN",
    ///     "openid":"OPENID",
    ///     "scope":"SCOPE" 
    /// }
    /// </summary>
    [JsonObject]
    public class AuthTokenResponse : StandardResponse
    {
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty(ApiGlobalKey.ACCESS_TOKEN)]
        public string AccessToken { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("expires_in")]
        public int ExpiresIn { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("refresh_token")]
        public string RefreshToken { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("openid")]
        public string OpenID { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("scope")]
        public string Scope { get; set; }
    }
}
